// src/i18n/index.ts
import { createI18n } from 'vue-i18n';

//  import enLocale from 'element-plus/es/locale/lang/en';
//  import zhLocale from 'element-plus/es/locale/lang/zh-cn';
//import zhLocale from "element-plus/es/locale/lang/zh-cn";
// import zhCn from 'element-plus/lib/locale/lang/zh-cn'
//import enLocale from "element-plus/es/locale/lang/en";
// 导入你的语言文件
import enLocale from 'element-plus/es/locale/lang/en';
import zhLocale from 'element-plus/es/locale/lang/zh-cn'
import en from './en';
import zh from './zh';
// import en from './locales/en';
// import zh from './locales/zh';
const messages = {
  en: {
    ...en,
    ...enLocale, // Element Plus 的英文语言包
  },
  zh: {
    ...zh,
    ...zhLocale, // Element Plus 的中文语言包
  },
};

const i18n = createI18n({
  locale: 'zh', // 默认语言
  fallbackLocale: 'en', // 回退语言
  messages,
});

export default i18n;